// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements.  See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership.  The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License.  You may obtain a copy of the License at
//
//   http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied.  See the License for the
// specific language governing permissions and limitations
// under the License.

suite("test_binary_search_prune") {

    sql "drop table if exists table_200_undef_partitions2_keys3_properties4_distributed_by54 force"
    sql """create table table_200_undef_partitions2_keys3_properties4_distributed_by54 (
            col_date_undef_signed_not_null date  not null ,
                    col_bigint_undef_signed_not_null bigint  not null ,
            col_int_undef_signed int  null ,
            col_int_undef_signed_not_null int  not null ,
                    col_bigint_undef_signed bigint  null ,
                    col_date_undef_signed date  null ,
                    col_varchar_10__undef_signed varchar(10)  null ,
            col_varchar_10__undef_signed_not_null varchar(10)  not null ,
                    col_varchar_1024__undef_signed varchar(1024)  null ,
            col_varchar_1024__undef_signed_not_null varchar(1024)  not null ,
                    pk int
    ) engine=olap
    UNIQUE KEY(col_date_undef_signed_not_null, col_bigint_undef_signed_not_null)
    PARTITION BY             RANGE(col_date_undef_signed_not_null) (
            PARTITION p0 VALUES LESS THAN ('2023-12-11'),
            PARTITION p1 VALUES LESS THAN ('2023-12-15'),
            PARTITION p2 VALUES LESS THAN ('2023-12-16'),
            PARTITION p3 VALUES LESS THAN ('2023-12-25'),
            PARTITION p4 VALUES LESS THAN ('2024-01-18'),
            PARTITION p5 VALUES LESS THAN ('2026-02-18'),
            PARTITION p6 VALUES LESS THAN ('5024-02-18'),
            PARTITION p100 VALUES LESS THAN ('9999-12-31')
    )
    distributed by hash(col_bigint_undef_signed_not_null) buckets 30
    properties("enable_unique_key_merge_on_write" = "true", "replication_num" = "1");"""
    sql """insert into table_200_undef_partitions2_keys3_properties4_distributed_by54(pk,col_int_undef_signed,col_int_undef_signed_not_null,col_bigint_undef_signed,col_bigint_undef_signed_not_null,col_date_undef_signed,col_date_undef_signed_not_null,col_varchar_10__undef_signed,col_varchar_10__undef_signed_not_null,col_varchar_1024__undef_signed,col_varchar_1024__undef_signed_not_null) values (0,6,7,-7108875255481177315,-3057140074428691447,'2023-12-09','2024-02-18','o','i','y','r'),(1,-4,3,null,-2058684401201555505,'2023-12-12','2024-01-19',null,'n','p','t'),(2,2,-10,3369448906413439378,-3417786853416144501,'2023-12-15','2024-01-17','r','m','o','d'),(3,null,-10,-6873750461152912587,-5236167307296572325,'2026-02-18','2023-12-19','z','v',null,'b'),(4,8,-10,-4915516173863842600,5145599442222172530,'2023-12-09','2024-02-18','m','a',null,'k'),(5,-4,2,-2153369502360802387,-5717064775122382214,'2027-01-09','2023-12-14',null,'c','s','x'),(6,1,-10,-3738228734895073368,4901761101044939269,null,'2023-12-20','i','k',null,'n'),(7,5,-10,-732016388595379688,-7255667957396187699,null,'2024-02-18','w','r','t','v'),(8,9,-4,6900356255455691160,8045359049447769144,'2025-02-17','2023-12-14','v','l','z','f'),(9,0,-10,null,4274582303534508695,'2025-02-17','2026-02-18','z','y','k','e'),(10,6,3,279786945685146686,-874517974639412820,'2027-01-09','2027-01-16','a','i','m','v'),(11,null,7,-4309269309902300954,-6089305128009657574,'2023-12-18','2023-12-13',null,'v','r','f'),(12,-4,2,null,-2084621413289441736,null,'2023-12-13',null,'q','y','y'),(13,9,-10,null,4969952030739018213,'2023-12-09','2023-12-17','e','q','e','w'),(14,7,2,-3062298122616323191,2547721414737688483,'2026-02-18','2024-02-18','r','t','k','f'),(15,null,-10,6078077764746012318,-6600203839089827243,'2024-02-18','2023-12-19','c','x','t','n'),(16,-10,3,6653366722055778077,5675775662105122354,'2024-01-09','2024-01-19','y','y','t','f'),(17,9,8,4371590721132875278,-4611046125216342887,'2023-12-14','2023-12-17','z','k','c','k'),(18,7,6,-5652125673567029557,912350452828416924,'2023-12-09','2023-12-10','e','i','a','h'),(19,-10,8,null,6359333167122158015,'2023-12-19','2024-02-18','r','i','k','b'),(20,null,5,null,-6732289421800431001,'2025-06-18','2023-12-18','p','i','i','o'),(21,0,2,-4475551024166936684,8636937363803784095,'2026-02-18','2026-01-18','f','g','w','w'),(22,4,5,7512948363304395092,390651475036136043,'2025-06-18','2025-06-18','d','j','p','z'),(23,7,-4,-1109895781017116931,375295427339086255,null,'2023-12-18',null,'d','i','x'),(24,-10,-10,5415094277809364752,5493534320615854279,'2025-06-18','2025-06-18','s','x','b','u'),(25,2,6,1891302209479388865,5617566119596291658,'2023-12-13','2025-06-18','g','m','z','g'),(26,9,2,4089714541195200991,6637760038696234158,'2025-02-18','2023-12-18','o','e','c','h'),(27,null,3,7993821671510547780,-1529505307422332811,null,'2023-12-19','i','w','r','j'),(28,null,0,7815375059493866741,2060586019818783405,'2024-01-09','2024-01-09','h','j','v','q'),(29,null,4,-4609202646266193031,-6051437237004953825,'2024-01-31','2024-01-09','b','g','g','l'),(30,-10,7,2628362821864778866,-3035908523692496661,'2024-02-18','2024-01-19','m','z','k','i'),(31,1,-10,null,5660115017768032565,null,'2024-01-08','g','e','m','l'),(32,4,8,8153094660863546617,-2883048220733086947,null,'2027-01-16','c','l','i','d'),(33,3,4,null,-8153209022153066827,'2024-01-08','2027-01-16',null,'b','a','m'),(34,-4,2,-7607568776172159342,-768333224197966222,'2027-01-09','2027-01-09','f','f','l','u'),(35,null,9,-5894292371107910297,-2543730295042986736,'2024-01-17','2027-01-09','z','k','m','c'),(36,-4,6,2057638779675764708,-3199703630180614036,'2024-02-18','2023-12-14','h','j','z','a'),(37,7,4,-8952613754843334863,-3660151902943905684,'2024-01-09','2023-12-13','c','e',null,'a'),(38,-4,5,2928459187719987989,3925786382501875870,'2023-12-19','2023-12-12',null,'u','d','q'),(39,-4,9,-6236142611207706499,-2631440602627438473,'2025-06-18','2024-02-18','a','w','v','o'),(40,-10,4,null,8960030317067687153,'2023-12-12','2025-02-17','p','d','c','r'),(41,5,1,3948234214435926194,-2261394019332222555,'2023-12-15','2026-01-18','c','q','k','i'),(42,4,5,7693225076398095494,-3344527714454717875,'2023-12-16','2023-12-12','o','n',null,'e'),(43,-4,1,5019733265751794124,-6101846462947677157,'2026-02-18','2023-12-17','h','a','l','e'),(44,5,3,-2411640512563112314,5941328774323912164,'2024-01-17','2023-12-15',null,'e','m','n'),(45,1,3,null,-5535789202715124983,'2023-12-20','2024-01-19',null,'p','p','i'),(46,null,-4,-7849291711107273550,-5415100715932061352,'2023-12-11','2026-02-18',null,'k',null,'h'),(47,-4,-4,-6610419956586634505,3240237874637759489,'2024-01-17','2023-12-18','f','b',null,'e'),(48,5,5,1126891629067350093,-2483592835746981191,null,'2025-02-18','h','g',null,'u'),(49,1,-10,-7765198628330987935,-2234479851123506036,'2023-12-19','2024-02-18','c','t',null,'f'),(50,5,-10,993018221259321768,-5479559541925368281,'2027-01-09','2024-01-31','r','f','z','w'),(51,5,8,8388068926058545972,2438216427106993007,'2026-01-18','2023-12-09',null,'s','k','d'),(52,7,2,-7049496775007279848,-1843982124834111278,'2025-06-18','2026-01-18','t','h',null,'x'),(53,6,6,-3276052461669521703,3053475664373347656,'2023-12-12','2023-12-20','e','v','l','c'),(54,4,-4,5401786180067744690,2462338283200457472,'2026-02-18','2026-02-18','u','d','z','g'),(55,0,-10,-703746703362383738,2857959647231612330,'2026-01-18','2027-01-09',null,'h','l','m'),(56,3,-10,-8849985475337748504,-1243412871348286195,null,'2024-01-17','x','q','q','v'),(57,1,4,8130615601328248675,-1864135276950530864,'2024-02-18','2024-02-18','k','v','y','r'),(58,-4,4,null,6200391063841894425,null,'2023-12-11','t','d','o','w'),(59,6,-10,-2007231304367720748,-8761117084545773981,'2023-12-20','2023-12-15',null,'v','a','d'),(60,-4,4,-7307922266866508946,1809109790379750086,'2023-12-11','2023-12-20','s','i','b','m'),(61,3,3,-3598613926788996708,7679518335315024678,null,'2023-12-09',null,'d','b','t'),(62,6,3,-3173550421892304424,-194591378044148611,'2023-12-14','2023-12-13',null,'s','z','d'),(63,4,-10,14711133546005493,-5790406338663897533,'2023-12-13','2023-12-10','n','z','m','w'),(64,-10,0,6122852287364213401,6537958839734404760,'2023-12-16','2024-02-18','g','y','o','f'),(65,null,2,-2147757242831036027,-6638504520307031212,'2027-01-09','2024-01-19','g','d','s','f'),(66,-10,9,-3160224832093095488,-2195856444143017436,'2025-02-17','2025-06-18','l','j','j','t'),(67,-10,0,8433238892892150801,8492174828017069520,null,'2026-01-18','n','a','t','f'),(68,null,8,8627383977478416907,7972010830654572458,'2023-12-14','2025-02-18',null,'b','y','w'),(69,-4,1,4042492305756044138,2682905872209578012,'2026-02-18','2023-12-12','y','o','q','t'),(70,-4,-10,-4717134606251432501,-1644724811594565929,null,'2023-12-14','s','r','s','j'),(71,null,0,-1277787443694602242,5945430717183041909,'2025-02-18','2023-12-12','e','k','m','k'),(72,4,8,6810885146261622906,-8128390126071295039,'2027-01-16','2026-01-18','b','h','d','u'),(73,-4,0,3211139725437945838,-2554769860821600901,'2025-02-17','2025-06-18','t','e','h','r'),(74,9,1,2900578345071369391,6181642858090494771,'2025-06-18','2024-01-31',null,'h','z','u'),(75,1,0,3547717469726467888,-2194879281784251575,'2024-01-17','2023-12-10','i','f','a','a'),(76,4,-4,-1611163988611022157,-4701639430145935928,'2023-12-13','2025-06-18','r','n',null,'w'),(77,2,3,-5419386214186071081,114338634151825893,'2023-12-20','2024-02-18','y','j','a','u'),(78,-10,6,506749970580843695,3077811244216246684,'2024-02-18','2023-12-20','f','o','z','y'),(79,-4,0,-791236882219385692,4599277580977570194,'2024-01-31','2024-01-08','a','l','a','d'),(80,-4,-4,null,2188092577879471193,'2027-01-09','2024-01-19',null,'m',null,'o'),(81,9,5,-8833708087554405498,49012772113130628,'2024-01-09','2024-01-17','h','e','g','x'),(82,1,3,-1563842985128811488,-5341888293425562498,'2023-12-16','2024-01-19','l','f','e','q'),(83,8,4,6442993508144838165,-4167973381491638076,'2023-12-11','2023-12-19','k','m','x','m'),(84,-10,-10,5445460530261369473,-513864326605026165,null,'2026-01-18','p','j','x','d'),(85,8,0,6290374342522817876,6274519546172846825,'2024-01-08','2023-12-18','w','k',null,'n'),(86,6,0,null,1720709611003574585,'2023-12-10','2023-12-13',null,'x','e','r'),(87,6,2,null,4284145131191679714,'2023-12-17','2023-12-15',null,'m',null,'m'),(88,2,3,-5652595544249394136,-980999300825381182,'2023-12-16','2027-01-09','n','c','q','j'),(89,null,6,null,-4047342419004057093,'2024-01-19','2023-12-15','j','d','t','n'),(90,null,7,null,-6631016654568896761,'2023-12-09','2023-12-19','h','e','a','n'),(91,1,7,177752492599675789,2655950572204748907,'2026-02-18','2023-12-13','c','v','m','x'),(92,null,6,null,7029650927509351872,'2027-01-09','2024-02-18','w','x',null,'j'),(93,-4,-10,-8159549729877078485,8750996628640293037,'2025-06-18','2023-12-13','m','w','y','r'),(94,null,1,848337499735627565,4304226990565659,'2023-12-13','2023-12-17','c','n','i','g'),(95,7,9,null,-1756187803382193436,'2023-12-11','2024-02-18','l','l','o','z'),(96,-4,7,-1352674625862182012,-4019753874215977637,'2026-01-18','2024-02-18','i','n','w','j'),(97,4,7,-5621434093645111827,1090228297076059174,'2025-06-18','2025-02-18','j','z',null,'n'),(98,-4,-4,-3493188801163087291,4611104193397342691,'2023-12-15','2025-02-18','x','s','i','p'),(99,5,2,null,-2862914549917038457,'2023-12-20','2023-12-10','j','u',null,'v'),(100,9,-10,-4688498844005464289,-8590849567146637143,'2023-12-09','2023-12-20',null,'b','g','x'),(101,0,-4,null,-607464810320572090,'2023-12-20','2023-12-17','u','r','w','e'),(102,5,7,null,5447449957252511063,'2023-12-19','2024-01-19','w','m','r','u'),(103,7,8,2946054945614189313,7914601860176751010,'2023-12-09','2023-12-16','g','b','z','f'),(104,9,0,3419834344962221373,9215721234244787861,'2026-01-18','2027-01-16',null,'m','p','x'),(105,null,4,1395600389800976163,1549274058287300110,null,'2023-12-18',null,'r','l','l'),(106,6,-10,null,-7739847628970987092,null,'2025-06-18','l','x','l','m'),(107,-4,4,-7732739070065709068,1484773498340703164,'2024-01-17','2023-12-13',null,'c','u','b'),(108,5,-10,4129523638986720359,-3805322991452755827,'2024-01-17','2024-02-18','l','o','l','l'),(109,1,8,null,5704136231122570617,'2024-01-31','2027-01-16','e','i',null,'w'),(110,null,0,null,-1771664192528665876,'2024-01-19','2024-01-19',null,'t','p','b'),(111,-10,-4,-856341642760899874,2946856772591034330,'2023-12-18','2023-12-18',null,'u','r','o'),(112,8,8,-1231818178128770749,3712491797202291652,'2025-06-18','2024-02-18','g','l',null,'k'),(113,null,2,-4226099381698135852,-7736680745431263134,null,'2024-01-09',null,'k',null,'u'),(114,-10,2,2935155095928623229,-598640004871712930,'2023-12-10','2023-12-15','e','s','n','h'),(115,-4,-4,-5905892432804316784,8959283348066129953,'2023-12-11','2024-02-18',null,'l',null,'c'),(116,-4,1,null,59567103197360037,'2025-02-18','2024-01-31','c','f','w','t'),(117,1,-4,8101518190905765313,-676002728830980415,'2023-12-14','2023-12-13','a','q','y','f'),(118,4,-10,null,1584643316897627852,'2023-12-09','2026-01-18',null,'j',null,'n'),(119,-4,-4,null,-1061664136248417127,'2023-12-15','2023-12-11','e','e','l','t'),(120,-10,8,4078910764371103117,-7532479663228280939,'2023-12-13','2026-02-18','w','a',null,'e'),(121,5,3,-9048363452560556419,2213338598906790915,'2024-01-09','2025-06-18','z','r','a','b'),(122,null,7,8140699926581374199,1176738247019407236,null,'2023-12-17','g','i','w','s'),(123,-10,1,-6609004481557285004,-2724991520002346999,'2023-12-14','2023-12-11','s','i','h','x'),(124,5,6,null,5891336901728797150,'2023-12-14','2027-01-16','p','t','h','l'),(125,9,1,-269396872707737722,-4116563045681501739,'2026-01-18','2023-12-12',null,'j',null,'m'),(126,-4,4,3474519170684481543,-367008740889462966,'2025-06-18','2023-12-15','n','z','g','a'),(127,-10,6,-6625240251588373132,-4137476041838659240,'2027-01-09','2025-06-18','q','m','j','y'),(128,null,-4,-2371036565195208302,2442551985697460853,null,'2023-12-14','d','r',null,'z'),(129,2,-4,-6113756491920426854,1453899190202629390,'2023-12-16','2023-12-10','t','n','i','z'),(130,8,1,6092600789180013847,-3685775812478579051,'2023-12-20','2025-02-17','x','e',null,'w'),(131,-4,2,null,4593225788180866348,'2025-02-17','2023-12-19','d','h',null,'g'),(132,null,2,729928185557217670,-4379875729039204659,'2023-12-12','2024-01-08','g','a','e','a'),(133,-4,1,3823902430519726812,-2552121282928957396,'2024-02-18','2025-06-18','t','c','u','k'),(134,3,0,-846942291663617676,-6992089918762620303,'2024-02-18','2024-01-17',null,'f','a','d'),(135,0,9,-2587601437559755408,-6362169373391337561,null,'2027-01-16','s','s',null,'w'),(136,-4,4,null,-8329900563139434466,null,'2024-01-17',null,'y','k','h'),(137,0,-4,-1839688713710135708,6347770619524885103,'2024-01-09','2024-01-19','q','m',null,'u'),(138,8,-4,null,6650955850824666354,'2023-12-20','2026-01-18','c','w','r','h'),(139,4,4,-454817961052678973,6951626126772543838,'2024-02-18','2023-12-19','a','z','q','j'),(140,-4,1,null,-3138855156188973237,null,'2024-01-19',null,'t','k','z'),(141,-4,5,-2059702461095195009,3565980337116778096,'2024-01-09','2024-01-09','q','x','s','z'),(142,5,-10,null,4546087826320504722,'2026-01-18','2023-12-09','e','q','j','m'),(143,9,8,null,2700282483383458778,null,'2023-12-20','o','g','v','u'),(144,5,-4,1885883152534030620,5093741049340786784,'2023-12-20','2023-12-20',null,'v','s','f'),(145,1,4,4127830181384030161,-3193158440716121508,null,'2027-01-09',null,'q','l','y'),(146,-4,-4,-2780165255032760447,-2447494946450563970,'2023-12-20','2024-02-18','z','u',null,'q'),(147,null,7,575434162324888863,-4880857567236495755,'2024-01-19','2023-12-14','v','h','x','o'),(148,6,-10,-3152002411291541237,2204435597141213629,'2024-01-19','2024-01-08','c','f','a','u'),(149,-10,1,null,-3608694274381214628,'2026-02-18','2023-12-19','g','t',null,'o'),(150,-4,-4,440129054138212604,3722583185342614235,'2023-12-18','2023-12-18','o','i','w','e'),(151,-4,8,1012601922176430635,-5194607547248812284,'2023-12-11','2023-12-15',null,'z','x','s'),(152,-4,8,7364999784442343885,2135086489909556289,'2024-02-18','2024-01-08','s','v','e','y'),(153,6,-4,-3752183390722410844,3316132760726582217,'2024-01-17','2023-12-16','b','w','r','k'),(154,0,5,null,6946014576614663312,null,'2024-01-08','y','c','c','k'),(155,2,-4,-1671803988365989354,2423707915313273346,'2027-01-16','2023-12-13','r','l',null,'o'),(156,-4,2,4962913130387117463,-8573589905098930286,'2023-12-17','2023-12-12',null,'n','j','x'),(157,8,-4,-4596228017739239450,-2469196122188564646,'2023-12-09','2024-02-18','m','l','l','r'),(158,9,6,-3188138845130678517,1069075425372570372,null,'2023-12-18',null,'i','t','n'),(159,6,6,-8841828564350543676,3539032014820612770,'2027-01-16','2023-12-18','i','i','m','i'),(160,9,-10,null,-4184497229093336186,'2024-02-18','2027-01-16','z','p','j','o'),(161,null,-4,-8786761466740219007,5659164448734146822,'2024-01-08','2023-12-20','y','b','k','x'),(162,4,-4,null,-6569539258288911916,'2024-01-08','2024-02-18',null,'p','a','x'),(163,4,6,-4882363553631925468,1049870904900806324,'2023-12-12','2026-02-18','a','p','v','q'),(164,2,0,-2949984690391898906,1205038897397020551,'2023-12-11','2023-12-19','k','b','s','y'),(165,-10,3,-6423044022190945710,7380268257418505313,'2027-01-09','2023-12-17','t','j','d','t'),(166,-4,-4,3763581306685359313,-939929575393674088,'2023-12-20','2024-01-17','h','b',null,'h'),(167,null,-4,1374749004376525366,4728420470360986115,'2027-01-16','2023-12-13','w','p',null,'o'),(168,3,1,null,-3259551932217146272,'2023-12-16','2023-12-17','k','d','u','c'),(169,null,5,7292262881191390649,1762913765832022910,null,'2026-02-18',null,'e','v','s'),(170,5,9,-6944314055244345047,-7533686634913552667,'2024-02-18','2027-01-16',null,'j','d','v'),(171,-10,7,-616170464022334563,3809821507617561797,'2023-12-16','2024-01-09','d','n',null,'m'),(172,-4,-10,5703082564472592386,-5302407467214829088,null,'2023-12-19','v','c',null,'v'),(173,null,-4,6323236518263402533,5204723933708257944,'2024-02-18','2024-02-18','a','j','s','n'),(174,-10,0,3631835010516762225,6479671593758993015,'2023-12-15','2023-12-11','g','c','o','a'),(175,-4,-4,-218289814611105226,-7623023579364034433,'2024-01-08','2025-06-18','r','g','x','h'),(176,-4,7,272129869392336130,-1723387795840165298,'2026-02-18','2025-06-18','z','v',null,'p'),(177,-10,6,5588613303015340742,4731005469149159628,'2027-01-16','2025-06-18','n','n','o','m'),(178,-4,4,null,-7264019903147699438,'2025-02-18','2023-12-12',null,'z','f','e'),(179,-4,-10,4777404638101715230,-5189725814245656631,'2024-01-09','2023-12-15','r','g',null,'p'),(180,1,-4,-6360657004699267085,-7438584366923539630,'2023-12-10','2023-12-14','p','t','b','q'),(181,7,0,-8590074788601906350,6163759603117067577,'2027-01-16','2027-01-16','q','s','j','y'),(182,4,6,2312920149278164877,-4666948047962880550,'2027-01-09','2026-02-18','s','v','n','d'),(183,null,7,4794937788793896498,1750288551415809908,'2023-12-14','2023-12-14','x','v',null,'t'),(184,-10,9,-4296000696887046330,-4854853167390003293,'2025-02-17','2024-01-31','e','n','y','k'),(185,-10,6,8101812800551472454,-7223084686619971386,'2024-01-19','2023-12-13','v','t',null,'b'),(186,null,6,null,-3604964528579964481,'2023-12-12','2023-12-14',null,'m',null,'u'),(187,0,-10,null,3320395838426873069,'2023-12-10','2025-02-18','l','m','j','b'),(188,9,-4,5594213650537667032,3855628089972346265,'2024-01-31','2027-01-09','f','b','c','y'),(189,null,-4,-6915238118133931202,7932464646318912755,'2024-01-17','2024-01-08','x','f','q','v'),(190,5,1,8842171434902092038,-7694129881650752675,null,'2024-02-18','d','o','t','t'),(191,7,-4,2472139669122524168,-609124065694874736,'2024-01-19','2027-01-16','b','s','b','e'),(192,8,9,-2321291426761082048,8581171982347407544,'2024-01-09','2024-01-31','n','i','i','j'),(193,3,7,null,-7494086425013526606,'2024-01-17','2024-01-09','u','l','q','n'),(194,-4,8,-1609916499310135123,-8130749415298731177,'2023-12-14','2023-12-20',null,'y','r','l'),(195,-10,0,-6398618157190106199,-2024871043776650296,null,'2023-12-13','d','n','c','p'),(196,-10,9,5882362322858267551,-6151609134327445347,'2023-12-09','2027-01-09','l','p','a','x'),(197,-10,0,4944137481802988491,58641121015272488,'2023-12-10','2024-02-18','z','d','z','t'),(198,-10,-4,3788920050847334381,-5278554804394644805,null,'2023-12-17','v','g','u','k'),(199,null,9,-3101860026969349438,-898187162163485149,'2023-12-09','2027-01-16','g','n','l','b');"""
    explain {
        sql """SELECT
        table1 . col_bigint_undef_signed AS field1
        FROM
        table_200_undef_partitions2_keys3_properties4_distributed_by54 AS table1
        WHERE
        NOT ( ( table1 . `col_int_undef_signed_not_null` IN (NULL) )
        OR table1 . `col_date_undef_signed_not_null` <> '2012-06-10' )
        OR table1 . `col_date_undef_signed_not_null` IN ('2027-01-09')
        GROUP BY
        field1
        ORDER BY
        field1
        LIMIT 10000;"""
        contains("partitions=1/8 (p6)")
    }

    sql "drop table if exists table_200_undef_partitions2_keys3_properties4_distributed_by54 force"
}
